<!DOCTYPE html>
<html>
<head>
{include file="common/head"}

<style type="text/css">
.wznr a{color: #01AAED;}
.thumb .cat {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0px;
}
.cat a{
    color: #fff;
  }
.cat a:hover {
    color: #fff;
}
</style>
</head>
<body>
{include file="common/header"}
<div class="layui-container mtop">
  <div class="layui-row layui-col-space15">
  	
  	<div class="layui-col-md12">{:load_advert('ArticleListCentre')}</div>
  	
    <div class="layui-col-md8">
      <div class="layui-card">
        
        <div class="layui-card-body">
          <a href="{:url('wendasns/article/index',[],false)}"><span class="wds-badge {if $categoryname eq 'all'}{else}wds-bg-gray{/if}">全部</span></a>
          {volist name="category" id="item"}<a href="{if $type eq 'new'}{:url('wendasns/article/index',['cname'=>$item.dir_name],false)}{else}{:url('wendasns/article/index',['cname'=>$item.dir_name,'type'=>$type],false)}{/if}"><span class="wds-badge {if $categoryname eq $item.dir_name}{else}wds-bg-gray{/if}">{$item.name}</span></a> {/volist}
        </div>
      </div>
      <div class="layui-card">
        
        <div class="layui-card-list">
          
          <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
              <li class="{if $type=='new'}layui-this{/if}"><a href="{if $categoryname eq 'all'}{:url('wendasns/article/index',[],false)}{else}{:url('wendasns/article/index',['cname'=>$categoryname],false)}{/if}">最新</a></li>
              <li class="{if $type=='hot'}layui-this{/if}"><a href="{:url('wendasns/article/index',['cname'=>$categoryname,'type'=>'hot'],false)}">热门</a></li>
            </ul>
            <div class="layui-tab-content">
              <div class="layui-tab-item layui-show">
                <div class="question-list">
                {volist name=":load_article('top')" id="item"}
                <section class="article-list-item">
                  <div class="thumb layui-hide-xs">
                    <a href="{:url('wendasns/article/show',$item)}" target="_blank">{:cover($item)}</a>
                    <span class="layui-badge cat"><a href="{:url('wendasns/article/index',['cname'=>$item.categorys.dir_name],false)}" target="_blank">{$item.categorys.name}</a></span>
                  </div>
                  
                  <div class="info">
                    <div class="info-limit">
                <h3><span class="layui-badge layui-bg-green" style="margin-right: 5px;"><i class="layui-icon layui-icon-top" style="font-size: 12px;"></i> 置顶</span>{if $item.recommend}<span class="layui-badge" style="margin-right: 5px;"><i class="layui-icon layui-icon-fire" style="font-size: 12px;"></i> 推荐</span>{/if}<a href="{:url('wendasns/article/show',$item)}" class="lista">{$item.title}</a></h3>
                <p style="color: #777;">{:substr_format($item.summary,80)}<p>
                      </div>
                    <div class="meta">
                      
                <div class="ask-userinfo" style="margin-bottom: 1px;">
                <a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.user_id)}{$item.users.username}</a> {volist name=":explode(',',$item.tags)" id="tags"}<a href="{:url('wendasns/topic/show',['tags'=>$tags])}" class="tag">{$tags}</a> {/volist}<span style="font-size: 14px;color: #777;float: right;"><i class="layui-icon layui-icon-date"></i>  {:range_time($item.create_time)}</span> 
              </div>
                  </div>
                    </div>
                    </section>
                {/volist}
                
                {volist name="logs" id="item"}
                <section class="article-list-item">
                  <div class="thumb layui-hide-xs">
                    <a href="{:url('wendasns/article/show',$item)}" target="_blank">{:cover($item)}</a>
                    <span class="layui-badge cat"><a href="{:url('wendasns/article/index',['cname'=>$item.categorys.dir_name],false)}" target="_blank">{$item.categorys.name}</a></span>
                  </div>
                  
                  <div class="info">
                    <div class="info-limit">
                <h3>{if $item.recommend}<span class="layui-badge" style="margin-right: 5px;"><i class="layui-icon layui-icon-fire" style="font-size: 12px;"></i> 推荐</span>{/if}<a href="{:url('wendasns/article/show',$item)}" class="lista">{$item.title}</a></h3>
                <p style="color: #777;">{:substr_format($item.summary,80)}<p>
                      </div>
                    <div class="meta">
                      
                <div class="ask-userinfo" style="margin-bottom: 1px;">
                <a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.user_id)}{$item.users.username}</a> {volist name=":explode(',',$item.tags)" id="tags"}<a href="{:url('wendasns/topic/show',['tags'=>$tags])}" class="tag">{$tags}</a> {/volist}<span style="font-size: 14px;color: #777;float: right;"><i class="layui-icon layui-icon-date"></i>  {:range_time($item.create_time)}</span> 
              </div>
                  </div>
                    </div>
                    </section>
                {/volist}
                  </div>
                <div class="pager">{$logs->render()|raw}</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div class="layui-col-md4">
      {include file="common/right"}
    </div>
  </div>
</div>
{include file="common/footer"}
</body>
</html>